package com.an.system.service;

import com.an.common.core.domain.PageQuery;
import com.an.common.core.page.TableDataInfo;
import com.an.system.domain.bo.SysOssBo;
import com.an.system.domain.vo.SysOssVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Collection;
import java.util.List;

/**
 * 文件上传 服务层
 *
 * @author Lion Li
 */
public interface ISysOssService {

    TableDataInfo<SysOssVo> queryPageList(SysOssBo sysOss, PageQuery pageQuery);

    List<SysOssVo> listByIds(Collection<Long> ossIds);


    SysOssVo getById(Long ossId);

    SysOssVo upload(MultipartFile file);

    void download(Long ossId, HttpServletResponse response) throws IOException;

    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    /**
     * 通过url上传
     *
     * @param blogTitle     博客标题
     * @param blogLogoImage 博客logo图片
     * @return {@link SysOssVo }
     * @author: Ann
     * @createDate: 2023/10/24 16:57:13
     * @version: 1.0.0
     */
    SysOssVo uploadByUrl(String blogTitle,String blogLogoImage);
}
